At least an operation key and a display are provided to electronic devices such as game devices, PDA's (Personal Digital Assistant), and the like. In order to achieve size reduction in electronic devices without sacrificing the size of a display, electronic devices are in practical use that have operation keys and displays provided on each of separate housings that are slidably connected together. In the electronic devices, the operation keys provided on a lower housing become exposed by sliding the lower housing against an upper housing from a state where the upper housing and the lower housing are completely overlapped so that a user can use the operation keys on the lower housing.
In such slidable electronic devices, a user cannot operate the operation keys when the upper housing and the lower housing are completely overlapped since the operation keys are not exposed to the outside. Since portable electronic devices are battery-powered, it is preferred to stop supply of electrical power to a CPU (Central Processing Unit), which performs applications, by changing an operation mode to a sleep mode in order to reduce power consumption in such a case. However, it is sometimes preferred to continue executing the application, such as music playing application, which does not basically require key operation, without changing the mode to the sleep mode even when the operation keys provided on the lower housing are not exposed to the outside.